package com.h117121.fashionshop.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.h117121.fashionshop.controller.generic.GenericController;

@Controller
@RequestMapping("/logout")
public class LogoutController extends GenericController {

	@RequestMapping(method = RequestMethod.GET)
	public String logout(HttpServletRequest request) {
		request.getSession().setAttribute("account", null);
		return "redirect:/home";
	}
}
